﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="order.aspx.cs" Inherits="order" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>果之-订购</title>
    <link href="css/guozhi.css" rel="stylesheet" type="text/css" />
    <link href="scripts/jBox/Skins2/Green/jbox.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
        .g-ipt
        {
            background-color: #FBFBFB;
            background-image: url("../images/bgx.png");
            background-position: 0 -72px;
            background-repeat: repeat-x;
            border: 1px solid #C1C1C1;
            color: #444444;
            font-family: Verdana,arial,sans-serif;
            font-size: 14px;
            line-height: normal;
            margin: 0;
            padding: 4px;
            text-align: left;
            vertical-align: middle;
        }
        .pntQuantity
        {
            width: 25px;
            text-align: center;
            background-color: #FBFBFB;
            background-image: url("../images/bgx.png");
            background-position: 0 -72px;
            background-repeat: repeat-x;
            border: 1px solid #C1C1C1;
            color: #444444;
            font-family: Verdana,arial,sans-serif;
            font-size: 14px;
            line-height: normal;
            margin: 0;
            padding: 4px;
            vertical-align: middle;
            font-weight: bolder;
        }
        .ico-succ
        {
            background-image: url("../images/global2.png");
            background-position: -180px -72px;
            background-repeat: no-repeat;
            color: #000000;
            display: inline-block;
            font-family: Verdana,arial,sans-serif;
            font-size: 14px;
            height: 24px;
            line-height: 166.6%;
            margin-right: 8px;
            padding: 2px 0;
            text-align: left;
            vertical-align: middle;
            width: 24px;
        }
        .slW
        {
            width: 100px;
        }
        .slW_Office
        {
            width: auto;
        }
    </style>
</head>
<body>
    <form id="form1">
    <input type="hidden" name="methodName" value="SubmitCustomerOrder" />
    <input type="hidden" id="hidIsOK" name="hidIsOK" />
    <div class="container">
        <!--#include file="common/header.htm"-->
        <!--#include file="common/quickBuy.htm"-->
        <script language="javascript" type="text/javascript">
            $(function () {


                if (GetCookie("gz_customer") == null) {
                    $("#txt_Email").removeAttr("readonly"); //去除readonly属性
                    $("#txt_Email").blur(function () {
                        //验证邮箱是否存在
                        $.ajax({
                            dataType: "html",
                            type: "post",
                            async: true,
                            cache: false,
                            url: "ajax/ajaxcustomer.ashx",
                            data: { methodName: "CustomerIsEffective", txt_Email: $.trim($("#txt_Email").val()) },
                            success: function (res) {
                                var data = res;
                                if (data.indexOf('此邮箱可以注册!') > -1) {
                                    $("#txt_EmailTip").html('');
                                }
                                else {
                                    $("#txt_EmailTip").html('<p class=\"noticeWrap\"><b class="\ico-warning\"></b><span class=\"txt-err\">' + data + '</span></p>');
                                }
                            },
                            buttons: $("#button"),
                            error: function (jqXHR, textStatus, errorThrown) { alert("服务器没有返回数据，可能服务器忙，请重试" + errorThrown); },
                            onError: "该邮箱不可用，请更换邮箱",
                            onWait: ""
                        });

                        var oldValue = $.trim($(this).val());
                        if (oldValue != "") {
                            $("#trpwd").show();
                        }
                    });
                }
                else {
                    $("#txt_Email").attr("readonly", true);
                }
            })
            function h() {
                $("#txt_PwdTip").hide();
            }
            function cgState() {
                $("#hidIsOK").val("0");
                //    alert($("#hidIsOK").val());
            }

            function selectPayClass() {
                $("#rbt_tenpay").attr("checked", true);
            }

            function selectDelivery() {
                $("#rbt_tenpay").attr("checked", false);
                $("#rbt_alipay").attr("checked", false);
                $("#rbt_tenpay").attr("checked", false);
                $("#pay_CashOnLine").attr("checked", false); 
            }
        </script>
        <script src="Scripts/gz_Cart.js" type="text/javascript"></script>
        <script src="Scripts/gz_Customer.js" type="text/javascript"></script>
        <script src="Scripts/gz_Validator-4.1.1.js" type="text/javascript" charset="UTF-8"></script>
        <script src="Scripts/gz_ValidatorRegex.js" type="text/javascript" charset="UTF-8"></script>
        <script src="Scripts/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
        <script src="scripts/jBox/jquery.jBox-2.3.min.js" type="text/javascript"></script>
        <script type="text/javascript">
            $(function () {

                InitShoppingCart();
                InitCustomerContact();
                LoadEvent();

            }) 
            
        </script>
        <input type="hidden" id="hidD" name="hidD" />
        <div class="register">
            <div>
                <img src="images/gz_dd_08.gif" width="176" height="41" /></div>
            <div class="table1">
                <table width="770" cellspacing="0">
                    <tr>
                        <td class="style1">
                            姓名 / Name
                        </td>
                        <td class="style2">
                            <input type="text" maxlength="40" id="txt_CustomerName" name="txt_CustomerName" autocomplete="off"
                                class="input_text" /><span style="color: Red">*</span>
                            <div id="txt_CustomerNameTip" style="width: 280px">
                        </td>
                    </tr>
                    <tr>
                        <td class="style1">
                            电话/手机 / Phone/Mobile
                        </td>
                        <td class="style2">
                            <input id="txt_TelNum" type="text" name="txt_TelNum" autocomplete="off" /><span style="color: Red">*</span><div
                                id="txt_TelNumTip" style="width: 280px">
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td class="style1">
                            邮件地址 / Email
                        </td>
                        <td class="style2">
                            <input id="txt_Email" type="text" name="txt_Email" autocomplete="off" class="g-ipt" /><div
                                id="txt_EmailTip" style="width: 280px">
                        </td>
                    </tr>
                    <tr id="trpwd" style="display: none;">
                        <td class="style1">
                            登录密码 / Password
                        </td>
                        <td class="style2">
                            <input id="txt_Pwd" name="txt_Pwd" type="password" autocomplete="off" class="g-ipt" /><span
                                style="color: Red">*</span><div id="txt_PwdTip" style="width: 280px">
                                </div>
                        </td>
                    </tr>
                    <tr>
                        <td class="style1">
                            配送区域 / Delivery area
                        </td>
                        <td class="style2">
                            <select id="sel_RegionId" name="sel_RegionId" class="slW">
                            </select>
                            <select id="sel_BusinessDistrictId" name="sel_BusinessDistrictId" class="slW">
                            </select>
                            <select id="sel_OfficeId" name="sel_OfficeId" class="slW_Office">
                            </select>
                            <select id="sel_FloorId" name="sel_FloorId" class="slW">
                            </select>
                        </td>
                    </tr>
                    <tr>
                        <td class="style1">
                            公司名称/ Company
                        </td>
                        <td class="style2">
                            <input id="txt_Address" type="text" name="txt_Address" autocomplete="off" /><span
                                style="color: Red">*</span><div id="txt_AddressTip" style="width: 280px">
                        </td>
                    </tr>
                    <tr style="display: none;">
                        <td class="style1">
                            备注 / Comment
                        </td>
                        <td class="style2">
                            <input id="txt_Memo" type="text" name="txt_Memo" autocomplete="off" />
                        </td>
                    </tr>
                </table>
            </div>
        </div>
        <div>
            <img src="images/gz_dd_20.gif" width="176" height="36" /></div>
        <div class="register">
            <table width="770" cellspacing="0">
                <tr>
                    <td class="style1">
                        配送日期 / Delivery date
                    </td>
                    <td class="style2">
                        <input id="txt_DeliveryDate" runat="server" type="text" name="txt_DeliveryDate" onclick="WdatePicker({doubleCalendar:true,dateFmt:'yyyy-MM-dd',minDate:'%y-%M-%d',readOnly:true})"
                            autocomplete="off" class="g-ipt " /><span style="color: Red"> 温馨提示：法定休息日及节假日暂时无法为您配送：）
                            </span>
                        <div id="txt_DeliveryDateTip" style="width: 280px">
                        </div>
                    </td>
                </tr>
                <tr>
                    <td class="style1">
                        配送时段 / Delivery time
                    </td>
                    <td class="style2">
                        <select id="sel_DeliveryPeriodId" name="sel_DeliveryPeriodId" style="width: 150px">
                        </select>
                        <span style="color: Red">为了保证准时为您送去高品质饮品，请勿选择您下单时间的配送时段 </span>
                    </td>
                </tr>
                <tr>
                    <td class="style1">
                        订单备注 / OrderComment
                    </td>
                    <td class="style2">
                        <input id="txt_OrderMemo" type="text" name="txt_OrderMemo" autocomplete="off" class="g-ipt"
                            value='如：常温、冰镇等口味偏好' onfocus="if(this.value=='如：常温、冰镇等口味偏好'){this.value=''}"
                            onblur="if(this.value==''){this.value='如：常温、冰镇等口味偏好'}" />
                        <div id="txt_OrderMemoTip" style="width: 280px">
                        </div>
                    </td>
                </tr>
            </table>
        </div>
        <div>
            <img src="/images/zf_gz_32.gif" width="176" height="36" /></div>
        <div class="register">
            <table width="770" cellspacing="0">
                <tr>
                    <td class="style1">
                        <label>
                            <input type="radio" name="pay_type" value="货到付款" id="pay_CashOnDelivery" onclick="selectDelivery();" checked="checked" />
                            货到付款</label>
                    </td>
                    <td class="style2">
                        订单送达时，将应付金额直接交付给我们的工作人员即可。
                    </td>
                </tr>
                <tr>
                    <td class="style1">
                        <label>
                            <input type="radio" name="pay_type" value="线上支付" onclick="selectPayClass();" id="pay_CashOnLine" />
                            线上支付</label>
                    </td>
                    <td class="style2">
                        即时到帐，支持支付宝、财付通线上支付形式。<br />
                        <font color="#800000" size="-1">提示：如需使用纸质优惠券、积分卡等，实付金额与订单金额不符，请勿选择线上支付。</font><br />
                        <input type="radio" name="pay_class" value="财付通" id="rbt_tenpay" /><a href="" target="_blank"><img
                            src="images/zf_gz_68.jpg" width="144" height="42" alt="财付通" border="0" /></a>
                        <input type="radio" name="pay_class" value="支付宝" id="rbt_alipay" /><a href="" target="_blank"><img
                            src="images/zf_gz_70.jpg" width="91" height="42" alt="支付宝" border="0" /></a>
                    </td>
                </tr>
            </table>
        </div>
        <div>
            <img src="images/gz_dd_32.gif" width="176" height="37" /></div>
        <div class="register">
            <div id="cart">
            </div>
        </div>
        <div class="tijiao">
            <p class="money">
                商品金额总计 ： <a id="amount"></a>
            </p>
            <p class="zhu">
                注：请在您的订单送达后将对应的金额交给我们的工作人员</p>
            <input id="btnsumbit" type="submit" value="" style="background-image: url(images/gz_dd_46.gif);
                width: 88px; height: 36px; border: 0px;" />
        </div>
    </div>
    <!--#include file="common/bottom.htm"-->
    </form>
</body>
</html>
